﻿using UnityEngine;
using System.Collections;
using YanhuaMMO;

public class StartUpCommand : ControllerCommand {

    public override void Execute(IMessage message) {

        if (!Util.CheckEnvironment()) 
            return;
        //-----------------关联命令-----------------------

        //-----------------初始化管理器-----------------------
        AppFacade.Instance.AddManager<LuaManager>(ManagerName.Lua);
        AppFacade.Instance.AddManager<PanelManager>(ManagerName.Panel);
        AppFacade.Instance.AddManager<SoundManager>(ManagerName.Sound);
        AppFacade.Instance.AddManager<TimerManager>(ManagerName.Timer);
       // AppFacade.Instance.AddManager<NetworkManager>(ManagerName.Network);
        AppFacade.Instance.AddManager<ResourceManager>(ManagerName.Resource);
        AppFacade.Instance.AddManager<ThreadManager>(ManagerName.Thread);
        AppFacade.Instance.AddManager<ObjectPoolManager>(ManagerName.ObjectPool);
        AppFacade.Instance.AddManager<WebMsgManager>(ManagerName.WebMsg);
        AppFacade.Instance.AddManager<LanguageManager>(ManagerName.Language) ;



        AppFacade.Instance.AddManager<GameManager>(ManagerName.Game);


        // NetworkManager.Instance.Init();
    }
}